From 396acf3bbbe00a192cb0ea0a9ccf91b1d8d2850b Mon Sep 17 00:00:00 2001 From: Fuwn <50817549+Fuwn@users.noreply.github.com> Date: Sat, 24 Jan 2026 13:09:50 +0000 Subject: Initial commit Created from https://vercel.com/new --- .../(main)/teams/[teamId]/TeamMemberEditForm.tsx | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/app/(main)/teams/[teamId]/TeamMemberEditForm.tsx (limited to 'src/app/(main)/teams/[teamId]/TeamMemberEditForm.tsx') diff --git a/src/app/(main)/teams/[teamId]/TeamMemberEditForm.tsx b/src/app/(main)/teams/[teamId]/TeamMemberEditForm.tsx new file mode 100644 index 0000000..4826746 --- /dev/null +++ b/src/app/(main)/teams/[teamId]/TeamMemberEditForm.tsx @@ -0,0 +1,62 @@ +import { + Button, + Form, + FormButtons, + FormField, + FormSubmitButton, + ListItem, + Select, +} from '@umami/react-zen'; +import { useMessages, useUpdateQuery } from '@/components/hooks'; +import { ROLES } from '@/lib/constants'; + +export function TeamMemberEditForm({ + teamId, + userId, + role, + onSave, + onClose, +}: { + teamId: string; + userId: string; + role: string; + onSave?: () => void; + onClose?: () => void; +}) { + const { mutateAsync, error, isPending } = useUpdateQuery(`/teams/${teamId}/users/${userId}`); + const { formatMessage, labels, getErrorMessage } = useMessages(); + + const handleSubmit = async (data: any) => { + await mutateAsync(data, { + onSuccess: async () => { + onSave(); + onClose(); + }, + }); + }; + + return ( +
+ ); +} -- cgit v1.2.3